package com.kehutong.contact.enums;

import org.coraframework.util.HashID;

/**
 * 客户类型
 *
 * @Author: liu jin Hwang
 */
public enum CustomerSource implements HashID {

    ENTERPRISE_WECHAT("1", "企业微信"),
    TELEMARKETING("2", "电话营销"),
    ACTIVE_CALL("3", "主动来电"),
    CUSTOMER_INTRODUCTION("4", "客户介绍"),
    FRIEND_INTRODUCTION("5", "朋友介绍"),
    INDEPENDENT_DEVELOPMENT("6", "独立开发"),
    NETWORK_SEARCH("7", "网络搜索"),
    ADVERTISING_MAGAZINE("8", "广告杂志"),
    EXHIBITION_PROMOTION("9", "展会促销"),
    OTHER_WAYS("10", "其他途径");

    private final String id;
    private final String desc;

    private CustomerSource(String id, String desc) {
    	this.id = id;
        this.desc = desc;
    }

    public static CustomerSource get(String desc) {
        CustomerSource[] customerSources = values();
        for (CustomerSource customerSource : customerSources) {
            if (customerSource.getDesc().equals(desc)) {
                return customerSource;
            }
        }
        return null;
    }

    @Override
    public String getId() {
        return id;
    }
    

	@Override
    public String getDesc() {
        return desc;
    }
    
}
